package com.sheep.classroompie.repository;


import com.sheep.classroompie.entity.Comment;
import com.sheep.classroompie.entity.Homework;
import com.sheep.classroompie.entity.SubmitHomework;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface HomeworkRepository {
  //根据课程码查作业
  List<Homework> selectHomeworksByCourseId(String courseId);

  Homework selectHomeworksById(Integer id);

  //添加作业
    Boolean addHomework(Homework homework);
    //删除作业
    Boolean deleteHomework(Integer homeworkId);
    //给选课学生添加作业副本
    void addSubmitHomework(SubmitHomework submitHomework);

    SubmitHomework selectSubmitHomeworkById(SubmitHomework submitHomework);

    Boolean uploadFile(SubmitHomework submitHomework);
    //提交作业
    void submit(SubmitHomework submitHomework);
    //查询交的作业
    List<SubmitHomework> selectSubmitHomeworkByStatus(SubmitHomework submitHomework);

  void scoring(SubmitHomework submitHomework);

    void updateHomework(Homework homework);

  void addComment(Comment comment);

  List<Comment> queryComments(Comment comment);
}
